package com.mbl.base.modular.mall.service.impl;

import com.mbl.base.modular.mall.entity.CouponUser;
import com.mbl.base.modular.mall.mapper.CouponUserMapper;
import com.mbl.base.modular.mall.service.ICouponUserService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

/**
 * <p>
 * 优惠券用户使用表 服务实现类
 * </p>
 *
 * @author lwj
 * @since 2020-03-22
 */
@Service
public class CouponUserServiceImpl extends ServiceImpl<CouponUserMapper, CouponUser> implements ICouponUserService {

    @Override
    public CouponUser queryOne(Long userId, Long couponId) {
        return query().eq("user_id", userId).eq("coupon_id", couponId).one();
    }
}
